package yf.mall.controller.api;


import com.yf.annotation.IgnoreAuth;
import com.yf.response.R;
import com.yf.service.WxWebService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/api/wx")
@RestController
public class ApiWxController {

    @Autowired
    private WxWebService wxWebService;

    @RequestMapping("/sign")
    @IgnoreAuth
    public R signature(String url) {
        JSONObject jsonObject = wxWebService.createWxConfig(url);
        return R.ok(jsonObject);
    }
}
